package com.zy.service;

import com.zy.pojo.Employee;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: xiaoqi
 * Date: 2021/5/31
 * Time: 下午 16:28
 * Description: 员工服务层接口
 */
public interface EmployeeService {

    /**
     * 添加一个员工
     *
     * @param employee
     * @return
     */
    Boolean insertEmployee(Employee employee);

    /**
     * 删除一个员工
     *
     * @param id
     * @return
     */
    Boolean deleteEmployeeById(Integer id);

    /**
     * 更新员工
     *
     * @param employee
     * @return
     */
    Boolean updateEmployee(Employee employee);

    /**
     * 查询所有员工
     *
     * @return
     */
    List<Employee> getEmployeeListPage(Integer page, Integer limit, Employee employee);

    /**
     * 根据id查询员工
     *
     * @param id
     * @return
     */
    Employee getEmployeeById(Integer id);

    /**
     * 根据 姓名和密码查询用户，先判断用户是否存在 ， 在判断密码是否正确
     *
     * @param name
     * @param password
     * @return
     */
    Employee getEmployeeByNameAndPassword(String name, String password);

    Integer getEmployeeCount(Employee employee);
}
